import java.io.Serializable;

   // 账户类，实现Serializable接口以便于保存到文件
public class Account implements Serializable {
    private String id;      // 账户号
    private String name;    // 姓名
    private double balance; // 余额

    // 构造方法
    public Account(String id, String name, double balance) {
        this.id = id;
        this.name = name;
        this.balance = balance;
    }

    // Getter和Setter方法
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    @Override
    public String toString() {
        return "账户号：" + id +
                "\t姓名：" + name +
                "\t余额：" + balance;
    }
}    